//
//  ST_BT_HUD+shortcut.swift
//  BTVideo
//
//  Created by DouLei on 2019/7/10.
//  Copyright © 2019 DouLei. All rights reserved.
//

import Foundation
import MBProgressHUD



//MARK: - OBJC  Use Extension Method
extension UIViewController{
    
    @objc func toast(text:String){
        
        ToastHud(text: text, view: self.view)
    }
    
    func toast_multi_line(text:String){
        
        main_thread_execute {
        
            MBProgressHUD.hide(for: self.view, animated: false)
            
            let hud = MBProgressHUD.showAdded(to: self.view, animated: true)
            hud.mode = .text
            hud.detailsLabel.text = text
            hud.detailsLabel.font = UIFont.systemFont(ofSize: 15, weight: UIFont.Weight.regular)
            hud.hide(animated: true, afterDelay: 2.5)
            
        }
        
    }
    
}
